#include<iostream.h>

#include<cv.h>
#include<highgui.h>

#pragma comment(lib,"cv.lib")
#pragma comment(lib,"highgui.lib")


int main()
{
	IplImage *img;
	cvNamedWindow("img");

	CvCapture *pCapture = cvCaptureFromCAM(-1);
//	CvCapture *pCapture = cvCaptureFromAVI("g://11.avi");
	while(1)
	{
		img = cvQueryFrame(pCapture);
		cvShowImage("img",img);

		cout<<"captureing"<<endl;

		cvWaitKey(33);
	}

	return 0;
}